package BehavioralMode.mediator.MarriageIntermediary;

public abstract class Person {
    private String name;
    private Integer age;
    private String identityCard;
    private Gender gender;

    private Integer partnerMaxAge;
    private Integer partnerMinAge;

    // 构造函数
    public Person(String name, Integer age, String identityCard,Gender gender) {
        this.name = name;
        this.age = age;
        this.identityCard = identityCard;
        this.gender = gender;
    }

    public void setPartnerMaxAge(Integer partnerMaxAge) {
        this.partnerMaxAge = partnerMaxAge;
    }

    public void setPartnerMinAge(Integer partnerMinAge) {
        this.partnerMinAge = partnerMinAge;
    }


    public Gender getGender() {
        return gender;
    }

    public Integer getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public Integer getPartnerMaxAge() {
        return partnerMaxAge;
    }

    public Integer getPartnerMinAge() {
        return partnerMinAge;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
